//
//  RealTimeFQIntroController.m
//  CoolTennisBall
//
//  Created by Coollang on 16/8/13.
//  Copyright © 2016年 CoolLang. All rights reserved.
//

#import "RealTimeFQIntroController.h"

@interface RealTimeFQIntroController ()
@property (weak, nonatomic) IBOutlet UILabel *numberOneLabel;
@property (weak, nonatomic) IBOutlet UILabel *numberTwoLabel;
@property (weak, nonatomic) IBOutlet UIView *lastLineView;

@end

@implementation RealTimeFQIntroController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.numberOneLabel.layer.cornerRadius = 9;
    self.numberTwoLabel.layer.cornerRadius = 9;
    
    self.numberOneLabel.layer.masksToBounds = YES;
    self.numberTwoLabel.layer.masksToBounds = YES;

    
    
}

- (void)viewDidLayoutSubviews {
    [super viewDidLayoutSubviews];
    
    // 创建一个渐变色Layer
    [self.lastLineView layoutIfNeeded];
    
    CAGradientLayer *gradientLayer = [[CAGradientLayer alloc] init];
    gradientLayer.frame = self.lastLineView.bounds;
    
    gradientLayer.colors = @[(__bridge id)kOrangeColor.CGColor, (__bridge id)[UIColor whiteColor].CGColor];

    [gradientLayer setStartPoint:CGPointMake(0, 0)];
    [gradientLayer setEndPoint:CGPointMake(0.5, 1)];
    [self.lastLineView.layer addSublayer:gradientLayer];
    
}


@end
